<?php

namespace Managers;

class Auth extends BaseManager
{
    protected $__table = '\Catalog\Mainuser';
public  function  getUser($login,$password)
   {

      $res = $this->_em->createQueryBuilder()
               ->select('user')
               ->from($this->__table, 'user')
               ->where("user.login= :login")->setParameter('login', $login)
               ->andWhere("user.password= :password")->setParameter('password', $password )
               ->getQuery()
               ->getArrayResult();
       return $res;
   }
}
